// @ts-ignore
import {createApp} from 'vue'
import App from './App.vue'

import {
    Button, Card, Cell, CellGroup, Col,
    Collapse,
    CollapseItem, DatetimePicker, Dialog,
    Divider, Empty, Field, Form,
    Icon,
    NavBar, Popup, Radio, RadioGroup, Row,
    Search, Skeleton, Stepper, Switch, Tab,
    Tabbar,
    TabbarItem, Tabs,
    Tag,
    TreeSelect
// @ts-ignore
} from 'vant';
// @ts-ignore
import * as VueRouter from 'vue-router';
import routes from "./config/router";
import './global.css';

const app = createApp(App);
app.use(Button);
app.use(NavBar);
app.use(Icon);
app.use(Tabbar);
app.use(TabbarItem);
app.use(Search);
app.use(Divider);
app.use(Tag);
app.use(Collapse);
app.use(CollapseItem);
app.use(TreeSelect);
app.use(Col);
app.use(Row);
app.use(Cell);
app.use(CellGroup);
app.use(Field);
app.use(Form);
app.use(Card);
app.use(Empty);
app.use(DatetimePicker);
app.use(Popup);
app.use(Stepper);
app.use(RadioGroup);
app.use(Radio);
app.use(Search);
app.use(Switch);
app.use(Skeleton);
app.use(Tab);
app.use(Tabs);
app.use(Dialog);

const router = VueRouter.createRouter({
    // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
    history: VueRouter.createWebHistory(),
    routes, // `routes: routes` 的缩写
})

app.use(router);


app.mount('#app');
